<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>


<isperp:grid gridId="categoryCiGrid"
	url="configuration/ci/listCiForPortal?fromType=${fromType}&key=${key }&value=${value }"
	adSearchTb="search-table" rowNum="10" cusViewUrl="configuration/ci/edit?readonly=true"
	excelExportUrl="incident/incident/excelExport">

	<jsp:attribute name="toolbar">
	<isperp:toolbar id="userToolbar">
		
	</isperp:toolbar>
	</jsp:attribute>

	<jsp:attribute name="searchbar">
	<table class="search-table">
	<tbody>
		 <tr>
						<td class="td1">编号：</td>
						<td><input type="text" field="code" op="cn">
						</td>
						<td class="td1">名称：</td>
						<td><input type="text" field="name" op="cn">
					</td>
						<td class="td1">资产状态：</td>
						<td><form:select path="var_assetStatus" field="status"
							id="SassetStatus" data-allow-empty="true" op="cn"
							items="${var_assetStatus}" itemLabel="name" itemValue="name" />
						</td>
					</tr>

					<tr>
						<td class="td1">使用人：</td>
						<td><input type="text" field="use_staff_name" op="cn">
						
					<td class="td1">位置：</td>
						<td><input type="text" field="location_name" op="cn">
						</td>
						
						<td class="td1">备注：</td>
						<td class="td2" colspan="3"><input type="text" field="meno"
						op="cn">
						</td>
					</tr>

					<tr>
						<td class="td1">报废日期：</td>
						<td class="td2"><input id="expiredDateStart" type="date"
						field="expired_date" op="gt" style="width: 68px" />~<input
						id="expiredDateEnd" name="expiredDate" type="date"
						field="expired_date" op="lt" style="width: 68px" />
						</td>
						<td class="td1">序列号：</td>
						<td colspan="3"><input type="text" style="width: 298px"
						field="asset_code" op="in"
						placeholder="多个序列号搜索可用逗号（,）隔开，如（SN01,SN02）">
						</td>
					</tr>
		
	</tbody>
	</table>
	</jsp:attribute>
	<jsp:body>
	<isperp:column name="id" title="id" hidden="true"></isperp:column>
 

	<isperp:column name="code" title="编号" width="70">
	</isperp:column>
	<isperp:column name="name" title="名称" width="100">
	</isperp:column>
	<isperp:column name="status" title="状态" width="60">
	</isperp:column>
	<isperp:column name="use_staff_name" title="责任人" width="60">
	</isperp:column>
	<isperp:column name="location_name" title="位置" width="100">
	</isperp:column>
	<isperp:column name="asset_code" title="序列号" width="100">
	</isperp:column>

	
</jsp:body>
</isperp:grid>
<script type="text/javascript">
	function ciDateFormatter(cellvalue, type) {
		var title = "";

		if (cellvalue) {

			var cellDate = Date.toDate(cellvalue);
			if (cellDate < nowDate) {
				if (type == 1) {
					title = "设备已过报废期！";
				} else {
					title = "设备已过维护期！";
				}
				return cellvalue + " <img title='"+ title +"' src='img/ci/overtime.gif'>";
			} else {
				return cellvalue;
			}

		}

		return "";

	};
</script>



